<?php
/**
 * Created by PhpStorm.
 * User: zhangrongxiang
 * Date: 2017/7/19
 * Time: 下午10:21
 */


$line = readline("cmd...\n");
if (!empty($line)) {
    readline_add_history($line);
}

$history = readline_list_history();
var_dump($history);